package com.zorn.platform.user.action;

import java.util.Map;

import com.zorn.core.provider.ActionSupportProvider;
import com.zorn.platform.user.service.IUserComponentService;

public class UserComponentAction extends ActionSupportProvider {

	/* Fields
	================================================== */
	private IUserComponentService userComponentService;

	/* Methods
	================================================== */
	public String query() {
		userComponentService.query(getParameterMap());
		
		Map<String, Object> result = userComponentService.getResult();
		result.size();

		setJSONObject(userComponentService.getResult());

		return JSON_RESULT;
	}

	public String count() {
		userComponentService.count(getParameterMap());

		setJSONObject(userComponentService.getResult());

		return JSON_RESULT;
	}

	public String insert() {
		userComponentService.insert(getParameterMap());

		setJSONObject(userComponentService.getResult());

		return JSON_RESULT;
	}

	public String update() {
		userComponentService.update(getParameterMap());

		setJSONObject(userComponentService.getResult());

		return JSON_RESULT;
	}

	public String delete() {
		userComponentService.delete(getParameterMap());

		setJSONObject(userComponentService.getResult());

		return JSON_RESULT;
	}

	/* Getters & Setters
	================================================== */
	public void setUserComponentService(IUserComponentService userComponentService) {
		this.userComponentService = userComponentService;
	}

}